//package com.scy.hospitalmanager.mydemo;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.scheduling.annotation.EnableAsync;
//import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
//
//import java.util.concurrent.Executor;
//import java.util.concurrent.ThreadPoolExecutor;
//
///**
// * @Author Jin_zuo_wei
// * @ClassName AsyncConfiguration
// * @Date 2021-09-20-18:41
// * @PackageName com.scy.hospitalmanager.mydemo
// * @Description 线程池实现
// * @Version 1.0.0
// */
//@Configuration
////@EnableAsync //启用异步
//public class AsyncConfiguration {
//
//    //声明一个线程池，并指定线程池名字。
//    @Bean("taskExecutor")
//    public Executor asyncExecutor(){
//        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
//        executor.setCorePoolSize(10);
//        executor.setThreadNamePrefix("ThreadTAT~");
//        executor.initialize();
//        return executor;
//    }
//}
